/*--------------------------------------------------------------------------------------------------
Yatak Operation System Project Copyright 2012
Author : Ilya Churaev
Started : 23 Apr 2012		Updated : 4 May 2012
File Name : string.h		Purpose : work with string
--------------------------------------------------------------------------------------------------*/
#ifndef _STRING_H
#define _STRING_H

#ifdef __cplusplus
extern "C" {
#endif

#include <stddef.h>
#include <libc/ctype.h>

extern int strcmp (const char * str1, const char * str2);
extern char * itoa (int num);
int atoi (char * str);
unsigned short *memsetw(unsigned short *dest, unsigned short val, int count);


extern char * strpbrk(const char *,const char *);
extern char * strsep(char **,const char *);
extern int strspn(const char *,const char *);
extern int strcspn(const char *,const char *);

/*
 * Include machine specific inline routines
 */
extern char * strcpy(char *,const char *);
extern char * strncpy(char *,const char *, int);
int strlcpy(char *, const char *, int);
extern char * strcat(char *, const char *);
extern char * strncat(char *, const char *, int);
extern int strlcat(char *, const char *, int);
extern int strcmp(const char *,const char *);
extern int strncmp(const char *,const char *,int);
extern int strnicmp(const char *, const char *, int);
extern char * strchr(const char *,int);
extern char * strnchr(const char *, int, int);
extern char * strrchr(const char *,int);
extern char * strstr(const char *,const char *);
extern int strlen(const char *);
extern int strnlen(const char *,int);
extern void * memset(void *,int,int);
extern void * memcpy(void *,const void *,int);
extern void * memmove(void *,const void *,int);
extern void * memscan(void *,int,int);
extern int memcmp(const void *,const void *,int);
extern void * memchr(const void *,int,int);
extern char *kstrdup(const char *s, unsigned int gfp);

#ifdef __cplusplus
}
#endif

#endif
